<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js"></script>
    <script src="js/http.js"></script>
</head>
<body>
    <img src="images/01.jpg" alt="">
    <script>
    var url="http://api.douban.com/v2/movie/in_theaters";
    var obj={
        url,
        handleData:function(res){
            console.log(res);
        }
    }
    function http(obj){
        $ajax({
            type:"get",
            url:url,
            dataType:"jsonp",
            success(res){
                obj.handleData(res);
            }
        })

    }
    </script>
</body>
</html>